package com.heima.controller;

import com.heima.mapper.RoleMapper;
import com.heima.pojo.Role;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/api/user-service/role")
@Api(tags = "role接口")
public class RoleController {
    @Autowired
    private RoleMapper roleMapper;

    /**
     * 角色列表
     */
    @GetMapping
    public List<Role> queryList(){
       return roleMapper.queryAll();
    }

}
